<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
			//创建对象第一种方式
			var obj = {};
			var obj = {
				name:'刘国庆',
				age:'28',
				后盾网
				sex:'男',
				eat:function(){
					console.log('我能吃');
				},
				sleep:function(){
					console.log('吃饱了睡');
				},
				code:function(){
					console.log('写代码');
				}	
			}
//			obj.height = 178; 
//			console.log(obj.name);
//			obj.eat();
//			console.log(obj.height);
		//创建对象第二种方式
		var obj = new Object();
		obj.name = '王盟';
		obj.age = 16;
		obj.eat = function(){
			console.log('我相当能吃');
		}
		obj.code = function(){
			console.log('我嗷嗷能编');
		}
		
//		console.log(obj.name);
//		obj.code();
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
			
		</script>
	</body>
</html>
